<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>我的采购</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <el-form :inline="true" :form="form">


            <el-form-item>
                <el-input clearable v-model="form.Article_Name" placeholder="请输入商品名称" />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSerach">查询</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="addEnterprise">发布</el-button>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="window.location.href = './Show.html'">我的采购</el-button>
                <el-badge :value="badge" :max="99" :hidden="badge == 0?true:false" class="item">
                    <el-button @click="mymessage()">消息</el-button>
                </el-badge>
            </el-form-item>
        </el-form>

        <el-table :data="tableData" stripe border height="calc(100vh - 140px)" style="width: 100%">
            <el-table-column align="center" label="序号" width="50" type="index"></el-table-column>
            <el-table-column align="center" prop="Picture_URL" label="商品图" width="125">
                <template v-slot="{row}">
                    <el-image v-if="row.Picture_URL != ''" style="width: 100px; height: 100px; border-radius: 9px;"
                        fit="cover" :src="DomainIMG + row.Picture_URL"></el-image>
                </template>
            </el-table-column>
            <el-table-column align="center" prop="Group_Purchasing_SerialNumber" width="200" label="商品编号"></el-table-column>
            <el-table-column align="center" prop="Article_Name" label="商品名"></el-table-column>
            <el-table-column align="center" prop="Total_Quantity" label="总数量"></el-table-column>
            <el-table-column align="center" prop="Amount" label="价格"></el-table-column>
            <el-table-column align="center" prop="Sell_Quantity" label="销售量"></el-table-column>
            <el-table-column align="center" prop="Residue_Quantity" label="剩余量"></el-table-column>
            <el-table-column align="center" prop="Contacts" label="联系人"></el-table-column>
            <el-table-column align="center" prop="Starting_Quantity" label="最低购买单位"></el-table-column>
            <el-table-column align="center" label="操作" width="200">
                <template v-slot="{row}">
                    <div>
                        <el-button type="primary" @click="detail(row.Group_Purchasing_SerialNumber)"
                            size="small">查看详情</el-button>
                    </div>
                </template>
            </el-table-column>
        </el-table>
        <el-pagination background v-show="total > 0" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10,20,30,50]"
            :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="./js/MyTenders.js"></script>
</body>

</html>